﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

namespace Flashlight.Basic
{
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
        }

        Windows.UI.Xaml.Shapes.Path _light = default(Windows.UI.Xaml.Shapes.Path);

        private void Path_Loaded(object sender, RoutedEventArgs e)
        {
            _light = sender as Windows.UI.Xaml.Shapes.Path;
        }

        private void Grid_Tapped(object sender, TappedRoutedEventArgs e)
        {
            if (_light.Visibility == Visibility.Collapsed)
            {
                _light.Visibility = Visibility.Visible;
            }
            else
            {
                _light.Visibility = Visibility.Collapsed;
            }
        }
    }
}
